package com.itheima.collection.genericity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author Anomaly
 * @date 2023/1/1 19:54
 */
public class GenericityDemo {
    public static void main(String[] args) {
        Integer[] arr = {1, 2, 3, 5};
        String[] arr2 = {"aa", "rr", "wq", "sd"};
        MyArrayList<String> myArrayList = new MyArrayList<>();
        myArrayList.add("java");
        myArrayList.add("java");
        myArrayList.add("python");
        myArrayList.add("html");

        System.out.println(myArrayList.get(1));

        System.out.println(myArrayList);

        MyArrayList.printArray(arr);
        MyArrayList.printArray(arr2);
    }
}
